package com.example.katalk_nari;

import android.content.Context;
import android.view.LayoutInflater;
import android.widget.FrameLayout;
import android.widget.TextView;

public class ReciveMessageview extends FrameLayout {

	private ChatItemData mData;

	private TextView tvMessage;
	private TextView tvDateTime;
	private TextView tvWriter;
	
	
	public ReciveMessageview(Context context) {
		super(context);
		
		LayoutInflater inflater = LayoutInflater.from(context);
		inflater.inflate(R.layout.item_recive, this);
		
		tvMessage = (TextView)findViewById(R.id.message);
		tvDateTime = (TextView)findViewById(R.id.datetime);
		tvWriter = (TextView)findViewById(R.id.writer);
	}

	public void setData(ReciveMessageData data){
		mData = data;
		tvMessage.setText(data.getMessage());
		tvDateTime.setText(data.getDateTimeToString());		
		tvWriter.setText(data.getWriter());
	}
	
}